<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        async function fn(){
            return 123;
        }

        async function main(){
            let res1 = await fn();
                console.log(res1);// 123
                let res2 = await Promise.resolve('ok');
                    console.log(res2);// ok
                    let res3 = await Promise.reject('error');
                        console.log(res3);// 不输出
        }
        main();
    </script>
</body>
</html>